rm saida2.txt

mpicc ultimo10.c -o 10.o -fopenmp -O3
mpicc ultimo20.c -o 20.o -fopenmp -O3
mpicc ultimo30.c -o 30.o -fopenmp -O3
mpicc ultimo40.c -o 40.o -fopenmp -O3
mpicc ultimo50.c -o 50.o -fopenmp -O3
mpicc ultimo60.c -o 60.o -fopenmp -O3
mpicc ultimo70.c -o 70.o -fopenmp -O3
mpicc ultimo80.c -o 80.o -fopenmp -O3
mpicc ultimo90.c -o 90.o -fopenmp -O3
mpicc ultimo100.c -o 100.o -fopenmp -O3

echo "Compilação completa..."

mpirun -np 2 --hostfile hosts.txt 10.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 20.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 30.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 40.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 50.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 60.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 70.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 80.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 90.o >> saida2.txt
mpirun -np 2 --hostfile hosts.txt 100.o >> saida2.txt

echo "Terminei np = 2"
